#ifndef CARSQL_H
#define CARSQL_H

#include <QObject>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlTableModel>
#include <QDebug>
class carsql:public QObject
{
    Q_OBJECT
public:
    explicit carsql(QObject *parent = nullptr);
    QString CarID;
    QString FaceMask;
    float Tmp;
    void AddData2Sqltest();
    void SetPrice(int Price);
    void StatisticalTime(QString carID);
    unsigned int GetPrice();
private:
    /* 数据库连接类 */
    QSqlDatabase CarSql;

    /* 用于查询数据 */
    QSqlQueryModel *sqlQueryModel;

    unsigned int money;
    unsigned int Price;

signals:
    void SeedPriceTTS(unsigned int);
    void SeedTTS(QString);
    void Seedimt(QString);
public slots:
    void GetData(QString);
    void showalldata();
    void deletesqldata(int row);
    void deletealldata();
};

#endif // CARSQL_H
